-- GENERATED SPELL FOR [Tidelord Rrurgaz] --


function spell0_16072(pUnit, Event) --@Demoralizing Shout,Self--
pUnit:FullCastSpellOnTarget(16244,pUnit)
pUnit:RegisterEvent('Sorts_16072', 30280, 1)
end

function spell1_16072(pUnit, Event) --@Rend,n/a--
pUnit:FullCastSpellOnTarget(16509,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16072', 15000, 1)
end

function spell2_16072(pUnit, Event) --@Thunderclap,Self--
pUnit:FullCastSpellOnTarget(15588,pUnit)
pUnit:RegisterEvent('Sorts_16072', 10304, 1)
end

function spell3_16072(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(15576,pUnit)
pUnit:RegisterEvent('Sorts_16072', 628, 1)
end

function spell4_16072(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(17207,pUnit)
pUnit:RegisterEvent('Sorts_16072', 2000, 1)
end

function Sorts_16072(pUnit, Event)
local choix_sorts_16072 = math.random(0, 4)
if choix_sorts_16072 == 0 then
pUnit:RegisterEvent('spell0_16072', 1, 1)
end
if choix_sorts_16072 == 1 then
pUnit:RegisterEvent('spell1_16072', 1, 1)
end
if choix_sorts_16072 == 2 then
pUnit:RegisterEvent('spell2_16072', 1, 1)
end
if choix_sorts_16072 == 3 then
pUnit:RegisterEvent('spell3_16072', 1, 1)
end
if choix_sorts_16072 == 4 then
pUnit:RegisterEvent('spell4_16072', 1, 1)
end
end

function mob16072_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_16072', math.random(1500, 3000), 1)
end

function mob16072_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16072_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16072_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(16072, 1, 'mob16072_Action')
RegisterUnitEvent(16072, 2, 'mob16072_Leave')
RegisterUnitEvent(16072, 3, 'mob16072_Kill')
RegisterUnitEvent(16072, 4, 'mob16072_Die')
